package com.jyh.fanxing;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author JYH
 * @Date 2024/7/31 11:10
 * @Description
 */
public class ComparableImpl implements Comparable{


    @Override
    public List<Student> lowScore(List<Student> list) {
        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = 0; j < list.size() - 1 - i; j++) {
                if (list.get(j).getScore()<list.get(j+1).getScore()){
                Student  temp=list.get(j);
                list.set(j,list.get(j+1));
                list.set(j+1,temp);
                }
            }

        }
        return list;
    }


}
